import React from 'react';

export const Counter = () => {

    const [count , setCount] = React.useState(0);

    return (
        <div>
            
            
            <button onClick={() => setCount(i => i - 1)}> - </button>
            <span> {count} </span>
            <button onClick={() => setCount(i => i + 1)}> + </button>

        </div>
    );

}